package com.jayqqaa12.jbase.jfinal.ext;

import org.springframework.context.ApplicationContext;

public class SpringPlugin extends com.jfinal.plugin.spring.SpringPlugin {

	private static ApplicationContext ctx;
	
	public SpringPlugin(ApplicationContext ctx) {
		super(ctx);
		this.ctx = ctx;
	}
	
	public static <T>T getBean(Class clazz){
		return (T)ctx.getBean(clazz);
	}

	
	
}
